import "./index.scss";
import { useState } from "react";
import { AtTabs, AtTabsPane } from "taro-ui";
import OutCome from "../components/OutCome";
import InCome from "../components/InCome";

function Tool() {
  const tabList = [{ title: "支出" }, { title: "收入" }];
  const [current, setCurrent] = useState(0);
  const handleClick = (value) => {
    setCurrent(value);
  };
  return (
    <AtTabs current={current} tabList={tabList} onClick={handleClick}>
      <AtTabsPane current={current} index={0}>
        <OutCome></OutCome>
      </AtTabsPane>
      <AtTabsPane current={current} index={1}>
        <InCome></InCome>
      </AtTabsPane>
    </AtTabs>
  );
}
export default Tool;
